<!--
  ***************************************
  * @author: 伍哥的传说
  * @date: 2024-11-01 08:00:00
  * @email: 844475003@qq.com
  * @description: Nuxt3 Admin Template
  ***************************************
-->
<template>
  <el-config-provider :locale="locale" :size="size">
    <NuxtLayout>
      <NuxtPage />
    </NuxtLayout>
  </el-config-provider>
  
</template>

<script setup lang="ts">
import { computed } from 'vue';
import { storeToRefs } from 'pinia';
import { messages } from '@/i18n';

const appStore = useStore.appStore();
const { componentSize, theme }: any = storeToRefs(appStore);

const size = computed(() => componentSize.value);
const locale = computed(() => messages[appStore.language].el);

onMounted(() => {
  nextTick(() => {
    handleThemeStyle(theme.value);
  })
});
</script>